chore(templates-maven-plugin): Add retry logic to template staging#2937
chore(templates-maven-plugin): Add retry logic to template staging#2937liferoad wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Conversation
The template staging process for both Classic and Flex templates can occasionally fail due to transient network issues or temporary service unavailability. This can lead to flaky and unreliable builds. This change introduces a retry mechanism using the Failsafe library. The staging operation will now be retried up to 3 times with a 10-second delay between attempts, making the build process more resilient to these intermittent failures.
Summary of ChangesHello @liferoad, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the robustness of the template staging process by integrating a retry mechanism. It addresses intermittent failures caused by network issues or service unavailability, ensuring more reliable and stable builds for both Classic and Flex templates. The implementation uses the Failsafe library to manage retries with a defined delay, significantly improving the resilience of the overall build pipeline. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2937 +/- ##
============================================
- Coverage 50.03% 50.00% -0.03%
- Complexity 4974 4975 +1
============================================
Files 967 967
Lines 59363 59369 +6
Branches 6455 6457 +2
============================================
- Hits 29700 29690 -10
- Misses 27554 27569 +15
- Partials 2109 2110 +1
🚀 New features to boost your workflow:
|
| if (definition.isClassic()) { | ||
| return stageClassicTemplate(definition, imageSpec, pluginManager); | ||
| return Failsafe.with(retryPolicy) | ||
| .get(() -> stageClassicTemplate(definition, imageSpec, pluginManager)); |
There was a problem hiding this comment.
I remember we might fail silently. If so, this retry might not be useful.
|
#2943 should be a better solution. |
The template staging process for both Classic and Flex templates can occasionally fail due to transient network issues or temporary service unavailability. This can lead to flaky and unreliable builds.
This change introduces a retry mechanism using the Failsafe library. The staging operation will now be retried up to 3 times with a 10-second delay between attempts, making the build process more resilient to these intermittent failures.
Fixes #2784